# -*- coding: utf-8 -*-
# @Time    : 2023/6/5 16:37
# @Author  : lxy
# @Email   : 1612393119@qq.com
# @File    : author_page.py
# @Software: PyCharm
from pages.base_page import BasePage
from appium.webdriver.common.mobileby import MobileBy as By

class AuthorPage(BasePage):

    guanzhu_locator=(By.XPATH,'//*[@resource-id="com.xiachufang:id/main_profile_follow_btn"]')
    back_locator=(By.XPATH,'//*[@resource-id="com.xiachufang:id/navigation_item_left_view_layout"]/android.widget.LinearLayout[1]/android.widget.RelativeLayout[1]/android.widget.ImageView[2]')
    author_name_locator=(By.XPATH,'//*[@resource-id="com.xiachufang:id/main_profile_user_name"]')

    def author_guanzhu(self):
        self.find_element(self.guanzhu_locator).click()
    def back_botn(self):
        self.find_element(self.back_locator).click()
    def author_name1(self):
        author_name=self.find_element(self.author_name_locator).text
        return author_name